#ifndef METABALLSRENDER_HPP
#define METABALLSRENDER_HPP

#include <Eigen/Core>
#include <Rendering/BaseRender.hpp>

namespace rtrt
{
  class MetaballsRender : public BaseRender
  {
    public:
      EIGEN_MAKE_ALIGNED_OPERATOR_NEW
      
      MetaballsRender();
      ~MetaballsRender();
      
      void initialize( int width, int height, bool useOpenGL, StereoMode mode );
      void draw( Camera *camera );
      void setDrawMode( BaseRender::DrawMode mode );
      
    protected:
      void doDrawCL( cl_mem outImage, Camera *camera ); 
      void doDrawGL( Camera *camera ){};
      
    private:
        cl_program _renderProgram;
        cl_kernel  _renderKernel;
        cl_mem     _metaballs;

        static const GLint COUNT = 8;
        Eigen::Vector4f _positions [COUNT];
  };
}
#endif